Conversation
|
Disclaimer: I don't know rust -- please review carefully |
|
@NullVoxPopuli I've opened a new pull request, #113, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull request overview
This PR implements indentation stripping for <template> tags in .gjs/.gts files as specified in RFC #1121. The feature automatically removes leading/trailing whitespace and common indentation from embedded templates, allowing developers to write naturally indented code that compiles to properly dedented templates.
Key changes:
- Added
strip_indent()function in Rust to calculate and remove common indentation - Modified template content processing to apply indentation stripping before compilation
- Added comprehensive test coverage for various indentation scenarios including opt-out behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/transform.rs |
Core implementation of strip_indent() function and integration into template content processing |
src/lib.rs |
Integration tests for basic indentation stripping scenarios |
test/node/process.test.js |
Comprehensive test suite covering edge cases and RFC compliance |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ing/trailing newline stripping
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ittle ambiguous, oops)
RFC: emberjs/rfcs#1121
Criteria / Algo:
<template>and closing</template>in gjs/gts files should be stripped.<template>and before the line with</template>